Skip to content

Conversation

@bwitt
Copy link

@bwitt bwitt commented Nov 13, 2025

Fixes #1474

Requirements

All new code should be covered with tests, documentation should be updated. CI should pass.

Description of the Change

Return an error if we run out of disk space. Batch up the sync at the end of writing all files.

Checklist

  • unit-test added (if change is algorithm)
  • functional test added/updated (if change is functional)
  • man page updated (if applicable)
  • bash completion updated (if applicable)
  • documentation updated
  • author name in AUTHORS

@bwitt bwitt force-pushed the error_outofspace branch 2 times, most recently from 29895f0 to 60bc8f2 Compare November 13, 2025 23:45
@neolynx neolynx self-assigned this Nov 16, 2025
@neolynx neolynx requested a review from a team January 4, 2026 12:00
@neolynx
Copy link
Member

neolynx commented Jan 4, 2026

looks good !

could you add yourself to the AUTHORS file ?

@bwitt
Copy link
Author

bwitt commented Jan 4, 2026

Done! ls the added coverage enough?

@codecov
Copy link

codecov bot commented Jan 4, 2026

Codecov Report

❌ Patch coverage is 27.90698% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.48%. Comparing base (31fe26d) to head (90f0a3d).

Files with missing lines Patch % Lines
api/files.go 30.00% 20 Missing and 1 partial ⚠️
files/public.go 23.07% 7 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1504      +/-   ##
==========================================
- Coverage   74.90%   74.48%   -0.43%     
==========================================
  Files         160      160              
  Lines       18555    18592      +37     
==========================================
- Hits        13899    13848      -51     
- Misses       3504     3592      +88     
  Partials     1152     1152              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bwitt bwitt force-pushed the error_outofspace branch 3 times, most recently from 949e41f to eac71af Compare January 5, 2026 00:10
@neolynx
Copy link
Member

neolynx commented Jan 5, 2026

I think there is something wrong. you added tests which actually should cover the changes.. but: patch coverage is 27.90698% and in the diff view the lines are red (needs codeov plugin installed in browser now) ...

@bwitt
Copy link
Author

bwitt commented Jan 6, 2026

is this the problem:

[2026-01-05T00:30:21.971Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 429 - {"message":"Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 482s."}

@bwitt
Copy link
Author

bwitt commented Jan 6, 2026

also it did not error

[2026-01-05T00:30:21.971Z] ['info'] Codecov will exit with status code 0. If you are expecting a non-zero exit code, please pass in the `-Z` flag

@neolynx
Copy link
Member

neolynx commented Jan 11, 2026

The test env does not have root priviledges... so the relevant tests are skipped:

https://github.com/aptly-dev/aptly/actions/runs/20895944097/job/60034478958?pr=1504#step:8:652

That's why the coverage is low...

let's see if there is another way to test this.

@neolynx
Copy link
Member

neolynx commented Jan 11, 2026

is this the problem:

[2026-01-05T00:30:21.971Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 429 - {"message":"Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 482s."}

i never fully understood why coverage is sometimes shown and sometimes not.

@bwitt
Copy link
Author

bwitt commented Jan 11, 2026

maybe we can try running these tests with sudo

@bwitt
Copy link
Author

bwitt commented Jan 11, 2026

[2026-01-05T00:30:21.971Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 429 - {"message":"Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 482s."}

Actually I think this missing codecov token is expected. this is running on my fork, which does not have access to the secret CODECOV_TOKEN which is by design for forks.

@bwitt
Copy link
Author

bwitt commented Jan 11, 2026

and now the codecov check is missing? what's happening?

@bwitt
Copy link
Author

bwitt commented Jan 11, 2026

actually nevermind I think everything should work now. @neolynx if you create a PR to check I think codecov should look better now!

@neolynx
Copy link
Member

neolynx commented Jan 11, 2026

codecov/patch — 75.55% of diff hit (target 74.90%)
codecov/project — 75.41% (+0.50%) compared to a70f572

way better... ;-) let me update the PR

@neolynx
Copy link
Member

neolynx commented Jan 11, 2026

I added 3 changes:

  • ci: run unit tests in docker
  • ci: provide 1MB /smallfs to docker
  • unit-test: use /smallfs when non-root

now, when not running as root, a /smallfs mount is expected. Pipeline and make docker-unit tests start a docker container providing a 1MB /smallfs...

maybe the coverage upload should fail the pipeline if it cannot upload ?

- run separate unit-test job
- build docker
- allow make docker-unit-tests in ci
@neolynx
Copy link
Member

neolynx commented Jan 11, 2026

coverage is not separate job, can be restarted more easily :)

@bwitt
Copy link
Author

bwitt commented Jan 11, 2026

thanks! I see the codecov run failed, and it failed CI.
per https://docs.codecov.com/docs/codecov-tokens#uploading-without-a-token

Please update to the latest versions of our CI actions or the Codecov CLI for more reliable tokenless uploads.

we could try using the latest codecov action v5 and see if that helps.

(separately: do we not have an automatic dependency bumper like Dependabot configured for this repo, so that this would have been updated already?)

Also sounds like uploading without a token is expected to fail, so I'm not sure if we want this to fail CI on PRs from forks like this, since it will fail, and it's expected to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

increase coverage The PR lacks test coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uploads return success when server is out of space

2 participants